package mylibrary.collection;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
	
		
public class MapTest {

	public static void main(String[] args) {
	
		Map treeMap = new TreeMap();
		
		treeMap.put("key2", "nihao");
		treeMap.put("key3", "gaoshuai");
		treeMap.put("key1", "dage");
		
		//treeMap.put(null, "1");
		
		
		
		Set keyit = treeMap.keySet();
		Iterator it = treeMap.keySet().iterator();
		
		//treeMap.put("c", "c");
		
		
		while(it.hasNext()) {
			System.out.println(it.next());
		}
		
	}
}
